import request from '@/utils/request'

export const categoryApi = {
  // 获取分类列表（支持分页）
  getCategories: (page = 1, size = 10) => request.get('/blog-admin/content/categories', {
    params: { page, size }
  }),
  
  getAllCategories: () => request.get('/blog-admin/content/categories/all'),
  // 其他API方法保持不变
  getCategory: (id) => request.get(`/blog-admin/content/categories/${id}`),
  createCategory: (data) => request.post('/blog-admin/content/categories', data),
  updateCategory: (id, data) => request.put(`/blog-admin/content/categories/${id}`, data),
  deleteCategory: (id) => request.delete(`/blog-admin/content/categories/${id}`)
}